package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YgRuleMapper;
import com.ruoyi.system.domain.YgRule;
import com.ruoyi.system.service.IYgRuleService;

/**
 * 员工手册规则Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-01
 */
@Service
public class YgRuleServiceImpl implements IYgRuleService 
{
    @Autowired
    private YgRuleMapper ygRuleMapper;

    /**
     * 查询员工手册规则
     * 
     * @param ruleId 员工手册规则主键
     * @return 员工手册规则
     */
    @Override
    public YgRule selectYgRuleByRuleId(Long ruleId)
    {
        return ygRuleMapper.selectYgRuleByRuleId(ruleId);
    }

    /**
     * 查询员工手册规则列表
     * 
     * @param ygRule 员工手册规则
     * @return 员工手册规则
     */
    @Override
    public List<YgRule> selectYgRuleList(YgRule ygRule)
    {
        return ygRuleMapper.selectYgRuleList(ygRule);
    }

    /**
     * 新增员工手册规则
     * 
     * @param ygRule 员工手册规则
     * @return 结果
     */
    @Override
    public int insertYgRule(YgRule ygRule)
    {
        return ygRuleMapper.insertYgRule(ygRule);
    }

    /**
     * 修改员工手册规则
     * 
     * @param ygRule 员工手册规则
     * @return 结果
     */
    @Override
    public int updateYgRule(YgRule ygRule)
    {
        return ygRuleMapper.updateYgRule(ygRule);
    }

    /**
     * 批量删除员工手册规则
     * 
     * @param ruleIds 需要删除的员工手册规则主键
     * @return 结果
     */
    @Override
    public int deleteYgRuleByRuleIds(Long[] ruleIds)
    {
        return ygRuleMapper.deleteYgRuleByRuleIds(ruleIds);
    }

    /**
     * 删除员工手册规则信息
     * 
     * @param ruleId 员工手册规则主键
     * @return 结果
     */
    @Override
    public int deleteYgRuleByRuleId(Long ruleId)
    {
        return ygRuleMapper.deleteYgRuleByRuleId(ruleId);
    }
}
